package controller;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import dao.EventGroup;

import model.EvenGroupModel;


public class ManageEventGroups {
	private static final long serialVersionUID = 1L;
	
	public void doGet(HttpServletRequest request, HttpServletResponse response)
								throws ServletException, IOException{
		List<EvenGroupModel> egs = new ArrayList<EvenGroupModel>();
		EventGroup egDTO = new EventGroup();
		egs = egDTO.ListEGroups();
		request.setAttribute("eventgroups",egs);
		request.getRequestDispatcher("eventgroups.jsp").forward(request, response);
//		RequestDispatcher dispatcher =
//			request.getRequestDispatcher
//			("products.jsp");
//			dispatcher.forward(request, response);
	}
	

}
